<?php
//EOD Helper Functions 
getConnection();
	function convertObjtoArray($o) {
		if(is_object($o)) {
			$no = Array();
			foreach($o as $n=>$v) {
				$no[$n] = convertObjtoArray($v);
			}
			$o = $no;
			unset($no);
		}
		if(is_array($o)) {
			foreach($o as $n=>$v) {
				$o[$n] = convertObjtoArray($v);
			}
		}
		return $o;
	}
	
	function timeFormatting($x){
		
		if(strlen($x)==5||strlen($x)==4){
			$len=strlen($x)+3;
			$x=str_pad($x, $len, ":00", STR_PAD_RIGHT);
		}
		return $x;
	}
	

?>